#ifndef GAME_AUDIO_H
#define GAME_AUDIO_H
#include "game_asset.h"
struct playing_sound {
    v2 CurrentVolume;
    v2 dCurrentVolume;
    v2 TargetVolume;

    real32 dSample;
    sound_id ID;
    real32 SamplesPlayed;
    playing_sound *Next;
};

struct audio_state {
    playing_sound *FirstPlayingSound;
    playing_sound *FirstFreePlayingSound;
    v2 MasterVolume;
    memory_arena *Arena;
};
void InitializeAudioState(audio_state *AudioState, memory_arena *Arena);
void ChangeVolume(audio_state *AudioState, playing_sound *Sound, real32 FadeDurationInSeconds,
                  v2 Volume);
#endif
